package com.smasher.update.api

import com.smasher.update.entity.BaseDataContainer
import com.smasher.update.entity.BeanVersion
import kotlinx.serialization.InternalSerializationApi
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST
import retrofit2.http.Url

interface KirovService {
    /**
     * 检查版本
     *
     * @return Single
     */
    @OptIn(InternalSerializationApi::class)
    @POST
    @FormUrlEncoded
    suspend fun getVersion(
        @Url url: String,
        @Field("rule_id") id: String,
        @Field("versionCode") code: Long
    ): BaseDataContainer<BeanVersion>
}
